home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 20 / Cream of the Crop 20 (Terry Blount) (1996).iso / program / n_b_v203.zip / SETCNTRY.DMO < prev    next >
Text File  |  1996-07-04  |  3KB  |  73 lines

  1. $if 0
  2.     ┌──────────────────────────╖                        PowerBASIC v3.20
  3.  ┌──┤          DASoft          ╟──────────────────────┬──────────────────╖
  4.  │  ├──────────────────────────╢    Copyright 1995    │ DATE: 1995-10-01 ╟─╖
  5.  │  │ FILE NAME   SETCNTRY.DMO ║          by          ╘════════════════─ ║ ║
  6.  │  │                          ║  Don Schullian, Jr.                     ║ ║
  7.  │  ╘══════════════════════════╝                                         ║ ║
  8.  │ A license is hereby granted to the holder to use this source code in  ║ ║
  9.  │ any program, commercial or otherwise,  without receiving the express  ║ ║
  10.  │ permission of the copyright holder and without paying any royalties,  ║ ║
  11.  │ as long as this code is not distributed in any compilable format.     ║ ║
  12.  │  IE: source code files, PowerBASIC Unit files, and printed listings   ║ ║
  13.  ╘═╤═════════════════════════════════════════════════════════════════════╝ ║
  14.    │                ....................................                   ║
  15.    ╘═══════════════════════════════════════════════════════════════════════╝
  16. $endif
  17.  
  18. '.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°.°
  19. ' ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° ° °
  20.  
  21. $INCLUDE "DAS-NB01.INC"
  22. $INCLUDE "DAS-NB02.INC"
  23. COLOR 7,0
  24. CLS
  25.  
  26. ? "┌────────────────────────────────────────────────────────────────────────────
  27. ? "│ fSetCountry% ( CountryCode% )  sets/loads DOS's CC data
  28. ? "│ fGetCountry$ ()                returns current CC data
  29. ? "├────────────────────────────────────────────────────────────────────────────
  30. ? "│ NOTE: This isn't going to work unless your system is configured for
  31. ? "│       code page switching. NLSFUNC etc.
  32. ? "│ SEE:  INTRNATS.TXT for full details
  33. ? "└─────────────────────────────────────────────────────────────────────────────
  34. ?
  35.  
  36. DIM tCC AS CountryCodeTYPE
  37.  
  38. DATA  0, "SYSTEM"             ' get your DOS manual out
  39. DATA  7, "RUSSIA"             ' turn to chapter 9 page 16 if you got the
  40. DATA 44, "ENGLAND"            ' <<right>> DOS ( else go to the appendix )
  41. DATA  1, "AMERICA"            ' and get CCodes that work on your system
  42. DATA 90, "TURKEY"             '
  43.  
  44. FOR X% = 0 TO 4
  45.   LOCATE 12, 1 : PRINT SPACE$( 960 ) : LOCATE 12, 1
  46.   READ C%, Cntry$
  47.   CC% = fSetCountry%( C% )
  48.   IF CC% = 0 THEN ITERATE
  49.   IF C% = 0 THEN OldCC% = CC%
  50.   LSET tCC = fGetCountry$( 0 )
  51.   PRINT "Country: "; Cntry$
  52.   PRINT "tCC.CountryCode =" ;       tCC.CountryCode
  53.   PRINT "tCC.DateFormat  =" ;       tCC.DateFormat
  54.   PRINT "tCC.MoneySymbol = ";       tCC.MoneySymbol
  55.   PRINT "tCC.ThousandSep = "; CHR$( tCC.ThousandSep )
  56.   PRINT "tCC.DecimalSep  = "; CHR$( tCC.DecimalSep  )
  57.   PRINT "tCC.DateSep     = "; CHR$( tCC.DateSep     )
  58.   PRINT "tCC.TimeSep     = "; CHR$( tCC.TimeSep     )
  59.   PRINT "tCC.MoneyFormat =" ;       tCC.MoneyFormat
  60.   PRINT "tCC.TimeFormat  =" ;       tCC.TimeFormat
  61.   PRINT "tCC.UcaseRout   =" ;       tCC.UcaseRout
  62.   PRINT "tCC.ListSep     = "; CHR$( tCC.ListSep )
  63.   LOCATE 14, 40 : PRINT fSYSdate$
  64.   LOCATE 15, 40 : PRINT fMoney$( 1234.56, 4 )
  65.   LOCATE 16, 40 : PRINT USING$( "####,.##", 5678.90 )
  66.   LOCATE 21, 40 : PRINT fSYStime$
  67.   LOCATE 25, 60
  68.   PRINT "PRESS ANY KEY";
  69.   IF fAnyKey$ = CHR$(027) THEN EXIT FOR
  70. NEXT
  71. fSetCountry% OldCC%                              ' reset origional
  72.  
  73.